home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacHack 1997
/
MacHack 1997.toast
/
Hacks
/
Hacks ’96
/
Sharks' Spark Hack
/
DesktopView.h
< prev
next >
Wrap
C/C++ Source or Header
|
1996-06-21
|
907b
|
39 lines
#ifndef DESK_VIEW_H
#define DESK_VIEW_H
#ifndef _VIEW_H
#include <View.h>
#endif
#include "Sparks.h"
class DesktopView : public BView {
public:
DesktopView(BRect frame, char *name);
~DesktopView();
virtual void AttachedToWindow();
virtual void Draw(BRect updateRect);
virtual void MouseDown( BPoint point );
void DrawOffscreen( void );
private:
BBitmap *m_pBitmap; // Offscreen bitmap.
BView *m_pView; // Offscreen view.
BRect m_ScreenRect;
char m_Black; // Used to erase
BSpark *m_pSparks; // The array of sparks.
BRect m_BoundingRect; // The old bounding rect to erase.
BPoint m_OldMouse; // The previous mouse coords, for throwing the pixels.
float m_Gravity; // We only use gravity if not in Mission Mode
uchar m_bMissionMode; // Impossible?
float m_MissionX;
float m_MissionY;
void Plot(long x, long y, char c);
};
#endif